package com.example.demo

import com.google.gson.Gson

object JsonUtil {
    val gson = Gson()
    fun <T> toJson(obj: T): String =
        gson.toJson(obj)

    inline fun <reified T> toObj(json: String): T =
        gson.fromJson<T>(json, T::class.java)

}